import React, { useEffect, useState } from "react";
import { Button } from "antd";

interface buttonProps {
  a?: any;
}

const Button1: React.FC<buttonProps> = () => {
  return <div>Buttson1</div>;
};

export default function index() {
  const [data, setData] = useState<number[]>([])

  useEffect(() => {
    for (let index = 0; index < 100; index++) {
      setData((prevState) => {
        return [...prevState, index]
      })
    }
  }, [])
  return (
    <div>
      <Button type="primary">123
        <Button1 />
      </Button>
      {data.map((item) => {
        return <div key={item}>{item}</div>;
      })}
    </div>
  );
}
